<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Veralkohol">


    <Style TargetType="{x:Type local:NumericUpDown}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:NumericUpDown}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="6*"/>
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>
                            <TextBox x:Name="txtValue" Grid.RowSpan="2"/>
                            <RepeatButton x:Name="btnUp" Grid.Column="1" Content="▲" FontSize="5"/>
                            <RepeatButton x:Name="btnDown" Grid.Column="1" Grid.Row="1" Content="▼" FontSize="5"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:AlcoholPlot}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:AlcoholPlot}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Canvas x:Name="verticalgrid" Background="Transparent"/>
                            <Canvas x:Name="horizontalgrid" Background="Transparent" />
                            <Canvas x:Name="Xaxis" >
                                <Canvas.Background>
                                    <LinearGradientBrush StartPoint="1,0" EndPoint="0,1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="DarkGray" Offset="0" />
                                                <GradientStop Color="Black" Offset="0.25" />
                                                <GradientStop Color="Black" Offset="1" />
                                            </GradientStopCollection>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Canvas.Background>
                            </Canvas>
                            <Canvas x:Name="Yaxis" Background="Transparent" />
                            <Canvas x:Name="canvas" Background="Transparent"/>
                            <Canvas x:Name="tooltip" Background="Gray" Opacity="0" Visibility="Hidden" />
                            <Canvas x:Name="tooltip2" Background="Transparent" Opacity="0" Visibility="Hidden" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:AlcoholDiagramPoint}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:AlcoholDiagramPoint}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="containerGrid" UseLayoutRounding="True">

                            <Border BorderThickness="0"  x:Name="vertLineb">
                                <!--<Border.Effect>
                                    <DropShadowEffect BlurRadius="5" ShadowDepth="20" Direction="-45" x:Name="vertLineb"/>
                                </Border.Effect>-->
                                <Line x:Name="vertLine" X1="0" X2="0" StrokeThickness="10"
                                  Y1="-5" Y2="5">
                                    <Line.Stroke>
                                        <SolidColorBrush Color="Blue" />
                                    </Line.Stroke>
                                </Line>
                            </Border>

                            <Border  BorderThickness="0" x:Name="littleVertLineb">
                                <Line x:Name="littleVertLine" X1="0" X2="0" StrokeThickness="5"
                                  Y1="-2.5" Y2="2.5">
                                    <Line.Stroke>
                                        <SolidColorBrush Color="Blue" />
                                    </Line.Stroke>
                                </Line>
                            </Border>
                            <Border BorderThickness="0" x:Name="horLineb">
                                <Line x:Name="horLine" X1="0" X2="0" StrokeThickness="2"
                                  Y1="0" Y2="0" SnapsToDevicePixels="True">
                                    <Line.Stroke>
                                        <SolidColorBrush Color="Blue" />
                                    </Line.Stroke>
                                </Line>
                            </Border>

                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup Name="MouseStates">
                                    <VisualState Name="MouseEnter">
                                        <Storyboard>
                                            <DoubleAnimation To="10" Storyboard.TargetName="horLine" Storyboard.TargetProperty="StrokeThickness"/>
                                        </Storyboard>
                                    </VisualState>

                                    <VisualState Name="MouseLeave" >
                                        <Storyboard>
                                            <DoubleAnimation To="2" Storyboard.TargetName="horLine" Storyboard.TargetProperty="StrokeThickness"/>
                                            <DoubleAnimation To="10" Storyboard.TargetName="vertLine" Storyboard.TargetProperty="StrokeThickness"/>
                                        </Storyboard>
                                    </VisualState>

                                    <VisualState Name="MouseDown" >
                                        <Storyboard>
                                            <!--<ColorAnimation To="Green" Storyboard.TargetName="horLine" Storyboard.TargetProperty="Color"/>-->
                                            <DoubleAnimation To="25" Storyboard.TargetName="vertLine" Storyboard.TargetProperty="StrokeThickness"/>
                                            <DoubleAnimation To="2" Storyboard.TargetName="horLine" Storyboard.TargetProperty="StrokeThickness"/>
                                        </Storyboard>
                                    </VisualState>

                                    <VisualState Name="LittleMouseEnter">
                                        <Storyboard>
                                            <DoubleAnimation To="5" Storyboard.TargetName="horLine" Storyboard.TargetProperty="StrokeThickness"/>
                                        </Storyboard>
                                    </VisualState>

                                    <VisualState Name="LittleMouseLeave" >
                                        <Storyboard>
                                            <DoubleAnimation To="2" Storyboard.TargetName="horLine" Storyboard.TargetProperty="StrokeThickness"/>
                                            <DoubleAnimation To="5" Storyboard.TargetName="littleVertLine" Storyboard.TargetProperty="StrokeThickness"/>
                                        </Storyboard>
                                    </VisualState>

                                    <VisualState Name="LittleMouseDown" >
                                        <Storyboard>
                                            <!--<ColorAnimation To="Green" Storyboard.TargetName="horLine" Storyboard.TargetProperty="Color"/>-->
                                            <DoubleAnimation To="25" Storyboard.TargetName="littleVertLine" Storyboard.TargetProperty="StrokeThickness"/>
                                            <DoubleAnimation To="2" Storyboard.TargetName="horLine" Storyboard.TargetProperty="StrokeThickness"/>
                                        </Storyboard>
                                    </VisualState>

                                    <VisualStateGroup.Transitions>
                                        <VisualTransition To="MouseLeave" GeneratedDuration="00:00:00">
                                            <VisualTransition.GeneratedEasingFunction>
                                                <BackEase EasingMode="EaseIn"/>
                                            </VisualTransition.GeneratedEasingFunction>
                                        </VisualTransition>

                                        <VisualTransition To="MouseEnter" GeneratedDuration="00:00:00">
                                            <VisualTransition.GeneratedEasingFunction>
                                                <BackEase EasingMode="EaseOut"/>
                                            </VisualTransition.GeneratedEasingFunction>
                                        </VisualTransition>

                                        <VisualTransition To="MouseDown" GeneratedDuration="00:00:00">
                                            <VisualTransition.GeneratedEasingFunction>
                                                <BackEase EasingMode="EaseOut"/>
                                            </VisualTransition.GeneratedEasingFunction>
                                        </VisualTransition>

                                        <VisualTransition To="LittleMouseLeave" GeneratedDuration="00:00:00">
                                            <VisualTransition.GeneratedEasingFunction>
                                                <BackEase EasingMode="EaseIn"/>
                                            </VisualTransition.GeneratedEasingFunction>
                                        </VisualTransition>

                                        <VisualTransition To="LittleMouseEnter" GeneratedDuration="00:00:00">
                                            <VisualTransition.GeneratedEasingFunction>
                                                <BackEase EasingMode="EaseOut"/>
                                            </VisualTransition.GeneratedEasingFunction>
                                        </VisualTransition>

                                        <VisualTransition To="LittleMouseDown" GeneratedDuration="00:00:00">
                                            <VisualTransition.GeneratedEasingFunction>
                                                <BackEase EasingMode="EaseOut"/>
                                            </VisualTransition.GeneratedEasingFunction>
                                        </VisualTransition>

                                    </VisualStateGroup.Transitions>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>

                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:AlcoholTooltip}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:AlcoholTooltip}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="Gray" BorderThickness="3">
                            <Border.Effect>
                                <DropShadowEffect BlurRadius="10" ShadowDepth="15" Direction="-45" />
                            </Border.Effect>
                            <!-- Width="275" Height="160"-->
                            <Grid Background="Crimson" Margin="5" >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Button x:Name="close" HorizontalAlignment="Right" Grid.ColumnSpan="2" Margin="2" Width="25">X</Button>
                                <TextBlock x:Name="drinktime" Grid.Row="1" Margin="3"/>
                                <Button x:Name="delete" Grid.Column="1" Grid.Row="1" Margin="2">Időpont teljes törlése</Button>

                                <TextBlock x:Name="drinks_txt" Text="Bevitt italok:" Grid.Row="2" Margin="3"/>
                                <Button x:Name="delDrink" Visibility="Collapsed" Grid.Row="2"
                                        Grid.Column="1" Margin="2">Kiválasztott ital törlése</Button>

                                <ListBox x:Name="drinks" Grid.Row="3" Grid.ColumnSpan="2">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="10" />
                                                    <ColumnDefinition Width="*"/>
                                                </Grid.ColumnDefinitions>
                                                <Image Source="{Binding ImageName}" >
                                                    <ToolTipService.ToolTip>
                                                        <Image Source="{Binding Bigname}" />
                                                    </ToolTipService.ToolTip>
                                                </Image>
                                                <TextBlock Text="{Binding Path=.}" Grid.Column="2" />
                                            </Grid>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>

                                <TextBlock Text="Várható kijózanodás ideje:" x:Name="jozan_txt" Grid.Row="4" Margin="3"/>
                                <TextBlock Grid.Column="1" x:Name="jozan" Grid.Row="4" Margin="3"/>

                            </Grid>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
